//--------------------------------------------------------------------------- void __fastcall LoadListViewStr(TListView * ListView, UnicodeString ALayoutStr) { UnicodeString LayoutStr = ::CutToChar(ALayoutStr, L';', true); int PixelsPerInch = LoadPixelsPerInch(::CutToChar(ALayoutStr, L';', true)); int Index = 0; while (!LayoutStr.IsEmpty() && (Index < ListView->Columns->Count)) { int Width; if (TryStrToInt(::CutToChar(LayoutStr, L',', true), Width)) { ListView->Column[Index]->Width = LoadDimension(Width, PixelsPerInch); } Index++; } }
//--------------------------------------------------------------------------- void __fastcall TScpExplorerForm::RestoreParams() { assert(Configuration); TCustomScpExplorerForm::RestoreParams(); bool HadHandleAllocated = RemoteDirView->HandleAllocated(); RemoteDirView->UnixColProperties->ParamsStr = WinConfiguration->ScpExplorer.DirViewParams; RemoteDirView->UnixColProperties->ExtVisible = false; // just to make sure RemoteDirView->ViewStyle = (TViewStyle)WinConfiguration->ScpExplorer.ViewStyle; if (HadHandleAllocated) { // This is here to make our persistence checks in VerifyControl pass, // but we do not want the view linger in the middle of delayed recreation anyway RemoteDirView->HandleNeeded(); } LoadToolbarsLayoutStr(WinConfiguration->ScpExplorer.ToolbarsLayout); SessionsPageControl->Visible = WinConfiguration->ScpExplorer.SessionsTabs; RemoteStatusBar->Visible = WinConfiguration->ScpExplorer.StatusBar; RemoteDriveView->Visible = WinConfiguration->ScpExplorer.DriveView; RemoteDriveView->Width = LoadDimension(WinConfiguration->ScpExplorer.DriveViewWidth, WinConfiguration->ScpExplorer.DriveViewWidthPixelsPerInch); }