示例#1
0
 private void SettingEditorResetAllInputControls()
 {
     StxBoolean.Value  = false;
     StxDatetime.Value = DateTime.Today;
     StxFile.Clear();
     StxFolder.Clear();
     StxLongInteger.Clear();
     StxPassword.Clear();
     StxText.Clear();
     StxFont.Clear();
     StxColor.Clear();
 }
示例#2
0
        private void SetProperties()
        {
            Padding NoPadding = new Padding(0, 0, 0, 0);

            BxOpenFile.ShowBorder             = false;
            BxSelectFile.ShowBorder           = false;
            BxFolderAdd.ShowBorder            = false;
            BxFolderRename.ShowBorder         = false;
            BxFolderDelete.ShowBorder         = false;
            BxFolderSearch.ShowBorder         = false;
            BxFolderSearchGotoNext.ShowBorder = false;
            BxFolderSearchGotoNext.Visibility = ElementVisibility.Collapsed;
            BxSettingAddNew.ShowBorder        = false;
            BxSettingRename.ShowBorder        = false;
            BxSettingFileSelect.ShowBorder    = false;
            BxSettingColorSelect.ShowBorder   = false;
            BxSettingFontSelect.ShowBorder    = false;
            BxSettingFolderSelect.ShowBorder  = false;
            BxSettingDelete.ShowBorder        = false;
            BxSettingChange.Enabled           = false;
            BxSettingSave.Enabled             = false;
            BxSettingCancel.Enabled           = false;
            BxNewFileName.ShowBorder          = false;
            BxCreateNewDatabase.ShowBorder    = false;

            SetPropertiesDateTimePicker();

            TxDatabaseFile.ReadOnly = true;
            TxFolderDelete.ReadOnly = true;

            StxFolder.ReadOnly = !Program.ApplicationSettings.AllowEditSettingFolderName;
            StxFile.ReadOnly   = !Program.ApplicationSettings.AllowEditSettingFileName;

            PvEditor.SelectedPage = PgEmpty;
            PvEditor.ZzPagesVisibility(ElementVisibility.Collapsed);

            PvFolders.Pages.ChangeIndex(PgFolderDelete, 4);
            PvFolders.Pages.ChangeIndex(PgFolderRename, 3);
            PvFolders.Pages.ChangeIndex(PgFolderAdd, 2);
            PvFolders.Pages.ChangeIndex(PgFolderSearch, 1);
            PvFolders.Pages.ChangeIndex(PgDatabase, 0);
            PvFolders.SelectedPage = PgDatabase;

            BxSettingUp.Left   = BxSettingCancel.Location.X + BxSettingCancel.Size.Width + 2 * BxSettingUp.Size.Width;
            BxSettingDown.Left = BxSettingCancel.Location.X + BxSettingCancel.Size.Width + 4 * BxSettingUp.Size.Width;

            PvSettings.Pages.ChangeIndex(PgSettingChange, 0);
            PvSettings.SelectedPage = PgSettingChange;

            PnTreeview.SizeInfo.SizeMode     = SplitPanelSizeMode.Absolute;
            PnTreeview.SizeInfo.AbsoluteSize = Program.ApplicationSettings.TreeViewSize;

            PnSettingAddTool.PanelElement.PanelBorder.Visibility    = ElementVisibility.Hidden;
            PnSettingChangeTool.PanelElement.PanelBorder.Visibility = ElementVisibility.Hidden;
            PnSettingAddTop.PanelElement.PanelBorder.Visibility     = ElementVisibility.Hidden;
            PnSettingChangeTop.PanelElement.PanelBorder.Visibility  = ElementVisibility.Hidden;

            StxLongInteger.ZzSetIntegerNumberOnly();
            StxDatetime.CalendarSize = new Size(400, 350);

            VxGridSettings = new GridSettings(this);
            VxGridSettings.InitializeGrid(this.GvSettings);

            PgSettingEmpty.Item.Visibility   = ElementVisibility.Collapsed;
            PgSettingMessage.Item.Visibility = ElementVisibility.Collapsed;

            PvEditor.Padding = new Padding(0, 1, 0, 0);
            PvEditor.Margin  = NoPadding;

            PnSettingAddTool.Padding = NoPadding;
            PnSettingAddTool.Margin  = NoPadding;

            PnSettingChangeTool.Padding = NoPadding;
            PnSettingChangeTool.Margin  = NoPadding;

            StxDatetime.Value = DateTime.Today;

            SetDatabaseFile(Program.ApplicationSettings.SettingsDatabaseLocation);
            Manager.InitVariables(this);
        }