Beispiel #1
0
 public DetailedView(Split useSplits, WSplit callingForm)
 {
     base.Paint += new PaintEventHandler(this.dviewPaint);
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
     this.InitializeComponent();
     this.parent = callingForm;
     this.menuItemShowSegs.Checked = Settings.Profile.DViewShowSegs;
     this.menuItemMarkSegments.Checked = Settings.Profile.DViewDeltaMarks;
     this.menuItemAlwaysOnTop.Checked = Settings.Profile.DViewOnTop;
     base.TopMost = Settings.Profile.DViewOnTop;
     this.updateColumns();
     this.clockFont = this.displayTime.Font;
 }
        public DialogResult ShowDialog(Form caller, WSplit wsplit)
        {
            this.wsplit = wsplit;

            // If for some reason, a value is not compatible with WSplit, the settings
            // will automatically be brought back to default.
            try
            {
                this.PopulateSettings();
            }
            catch (Exception)   // Any kind of exception
            {
                this.RestoreDefaults();
                MessageBoxEx.Show(this,
                    "An error has occurred and your settings were brought back to defaults.",
                    "Defaults Restored", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            return base.ShowDialog(wsplit);
        }
Beispiel #3
0
 public Painter(WSplit wsplit)
 {
     this.wsplit = wsplit;
 }
Beispiel #4
0
        // Custom ShowDialog method, that will populate the settings before calling the default method
        public DialogResult ShowDialog(WSplit wsplit, int startupPanel)
        {
            this.wsplit = wsplit;

            ListView_SetItemSpacing(listViewPanelSelector, (short)listViewPanelSelector.ClientSize.Width, 76);

            // Moves the wanted panel on top of the others
            this.listViewPanelSelector.Items[startupPanel].Selected = true;
            this.ActivePanel = startupPanel;

            // Tell that, so far, there were no change in the background settings:
            this.BackgroundSettingsChanged = false;

            // If for some reason, a value is not compatible with WSplit, the settings
            // will automatically be brought back to default.
            try
            {
                this.PopulateSettings();
            }
            catch (Exception)   // Any kind of exception
            {
                this.RestoreDefaults();
                MessageBoxEx.Show(this,
                    "An error has occurred and your settings were brought back to defaults.",
                    "Defaults Restored", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            return base.ShowDialog(wsplit);
        }