Ejemplo n.º 1
0
 private void btnCancel_Click(object sender, EventArgs e) {
     if(callBack != null) {
         callBack.BeginInvoke(DialogResult.Cancel, null, null);
         callBack = null;
     }
     Close();
 }
Ejemplo n.º 2
0
 private void Save(bool fApply) {
     SaveSettings(fApply);
     if(callBack != null) {
         callBack.BeginInvoke(fApply ? DialogResult.Yes : DialogResult.OK, null, null);
     }
     if(!fApply) {
         callBack = null;
         Close();
     }
 }
Ejemplo n.º 3
0
 public void OwnerWindowClosing() {
     callBack = null;
     Close();
 }
Ejemplo n.º 4
0
 private void OptionsDialog_FormClosing(object sender, FormClosingEventArgs e) {
     using(RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Quizo\QTTabBar")) {
         if(key != null) {
             Rectangle bounds = Bounds;
             if(WindowState == FormWindowState.Minimized) {
                 bounds = RestoreBounds;
             }
             int[] array = new int[] { bounds.Left, bounds.Top, bounds.Width, bounds.Height };
             QTUtility2.WriteRegBinary(array, "OptionWindowBounds", key);
         }
     }
     if(callBack != null) {
         callBack.BeginInvoke(DialogResult.Cancel, null, null);
         callBack = null;
     }
 }
Ejemplo n.º 5
0
 public OptionsDialog(PluginManager pluginManager, FormMethodInvoker callBack) {
     InitializeStaticFields();
     this.pluginManager = pluginManager;
     this.callBack = callBack;
     InitializeComponent();
     tabImageSetting = new TabImageSetting();
     propertyGrid1.SelectedObject = tabImageSetting;
     propertyGrid1.ExpandAllGridItems();
     fntStartUpGroup = new Font(treeViewGroup.Font, FontStyle.Underline);
     sfPlugins = new StringFormat(StringFormatFlags.NoWrap);
     sfPlugins.Alignment = StringAlignment.Near;
     sfPlugins.LineAlignment = StringAlignment.Center;
     SuspendLayout();
     lblVer.Text = "QTTabBar " + QTUtility2.MakeVersionString();
     tabPage1_Gnrl.Text = ResOpt_Genre[0];
     tabPage2_Tabs.Text = ResOpt_Genre[1];
     tabPage3_Wndw.Text = ResOpt_Genre[2];
     tabPage4_View.Text = ResOpt_Genre[3];
     tabPage5_Grps.Text = ResOpt_Genre[4];
     tabPage6_Apps.Text = ResOpt_Genre[5];
     tabPage7_Plug.Text = ResOpt_Genre[6];
     tabPage8_Keys.Text = ResOpt_Genre[7];
     tabPage9_Misc.Text = ResOpt_Genre[8];
     tabPageA_Path.Text = ResOpt_Genre[9];
     string[] strArray = QTUtility.TextResourcesDic["DialogButtons"];
     btnOK.Text = strArray[0];
     btnCancel.Text = strArray[1];
     btnApply.Text = strArray[2];
     chbActivateNew.Text = ResOpt[0];
     chbDontOpenSame.Text = ResOpt[1];
     chbCloseWhenGroup.Text = ResOpt[2];
     chbShowTooltip.Text = ResOpt[3];
     chbX1X2.Text = ResOpt[4];
     chbNavBtn.Text = ResOpt[5];
     chbNoHistory.Text = ResOpt[6];
     chbSaveExecuted.Text = ResOpt[7];
     chbDD.Text = ResOpt[8];
     lblLang.Text = ResOpt[9];
     lblNewTabLoc.Text = ResOpt[10];
     lblActvClose.Text = ResOpt[11];
     lblTabDblClk.Text = ResOpt[12];
     lblBGDblClik.Text = ResOpt[13];
     lblAction_BarDblClick.Text = ResOpt[14];
     lblMultiRows.Text = ResOpt[15];
     chbAutoSubText.Text = ResOpt[0x10];
     chbWhlClick.Text = ResOpt[0x11];
     chbNCADblClck.Text = ResOpt[0x12];
     chbWndUnresizable.Text = ResOpt[0x13];
     chbWndRestrAlpha.Text = ResOpt[20];
     chbBlockProcess.Text = ResOpt[0x15];
     chbFoldrTree.Text = ResOpt[0x16];
     chbNoTabFromOuteside.Text = ResOpt[0x17];
     chbHolizontalScroll.Text = ResOpt[0x18];
     chbWhlChangeView.Text = ResOpt[0x19];
     chbNeverCloseWindow.Text = ResOpt[0x1a];
     chbNeverCloseWndLocked.Text = ResOpt[0x1b];
     chbRestoreClosed.Text = ResOpt[0x1c];
     chbRestoreLocked.Text = ResOpt[0x1d];
     chbUseTabSkin.Text = ResOpt[30];
     btnHiliteClsc.Text = ResOpt[0x1f];
     lblTabSizeTitle.Text = ResOpt[0x20];
     lblTabWidth.Text = ResOpt[0x21];
     lblTabHeight.Text = ResOpt[0x22];
     lblTabWFix.Text = ResOpt_DropDown[0x18];
     lblTabWMax.Text = ResOpt[0x23];
     lblTabWMin.Text = ResOpt[0x24];
     lblTabFont.Text = ResOpt[0x25];
     btnTabFont.Text = ResOpt[0x25];
     chbBoldActv.Text = ResOpt[0x26];
     lblTabTxtClr.Text = ResOpt[0x27];
     btnActTxtClr.Text = ResOpt[40];
     btnShadowAct.Text = ResOpt[40];
     btnInactTxtClr.Text = ResOpt[0x29];
     btnShadowIna.Text = ResOpt[0x29];
     btnDefTxtClr.Text = ResOpt[0x2a];
     chbToolbarBGClr.Text = btnToolBarBGClr.Text = ResOpt[0x2b];
     chbFolderIcon.Text = ResOpt[0x2c];
     lblUserApps_Path.Text = ResOpt[0x2d] + ":";
     lblUserApps_Args.Text = ResOpt[0x2e] + ":";
     lblUserApps_Working.Text = ResOpt[0x2f] + ":";
     lblUserApps_Key.Text = ResOpt_Genre[7] + ":";
     lblGroupKey.Text = ResOpt_Genre[7] + ":";
     lblPluginLang.Text = ResOpt[0x30];
     chbHideMenu.Text = ResOpt[0x31];
     chbBSUpOneLvl.Text = ResOpt[50];
     chbNoFulRowSelect.Text = ResOpt[0x33];
     chbGridLine.Text = ResOpt[0x34];
     chbAlternateColor.Text = ResOpt[0x35];
     chbShowPreview.Text = ResOpt[0x36];
     chbPreviewMode.Text = ResOpt[0x37];
     chbSubDirTip.Text = ResOpt[0x38];
     chbSubDirTipMode.Text = ResOpt[0x37];
     chbSubDirTipModeHidden.Text = ResOpt[0x39];
     chbSubDirTipPreview.Text = ResOpt[0x36];
     chbSubDirTipModeFile.Text = ResOpt[0x3a];
     chbSelectWithoutExt.Text = ResOpt[0x3b];
     chbSubDirTipModeSystem.Text = ResOpt[60];
     chbSendToTray.Text = ResOpt[0x3d];
     lblPreviewWidth.Text = ResOpt[0x3e];
     lblPreviewHeight.Text = ResOpt[0x3f];
     chbRebarBGImage.Text = ResOpt[0x40];
     chbF2Selection.Text = ResOpt[0x41];
     chbTabCloseButton.Text = ResOpt[0x42];
     lblTabWhlClk.Text = ResOpt[0x43];
     chbSubDirTipOnTab.Text = ResOpt[0x44];
     clmnHeader_NoCapture.Text = ResOpt[0x45];
     chbTabCloseBtnAlt.Text = ResOpt[70];
     chbTabCloseBtnHover.Text = ResOpt[0x47];
     btnExportSettings.Text = ResOpt[0x48];
     chbCursorLoop.Text = ResOpt[0x49];
     lblNetworkTimeOut.Text = ResOpt[0x4a];
     chbSendToTrayOnMinimize.Text = ResOpt[0x4b];
     btnPreviewFont.Text = ResOpt[0x25];
     lblTabTextAlignment.Text = ResOpt[0x4c];
     lblMenuRenderer.Text = ResOpt[0x4d];
     string[] strArray2 = QTUtility.TextResourcesDic["TabBar_Option2"];
     chbTreeShftWhlTab.Text = strArray2[0];
     chbTabSwitcher.Text = strArray2[1];
     chbTabTitleShadow.Text = strArray2[2];
     chbAutoUpdate.Text = strArray2[3];
     chbRemoveOnSeparate.Text = strArray2[4];
     chbDriveLetter.Text = strArray2[5];
     chbPlaySound.Text = strArray2[6];
     btnBrowsePlugin.Text = strArray2[7];
     PluginView.BTN_OPTION = strArray2[8];
     PluginView.BTN_DISABLE = strArray2[9];
     PluginView.BTN_ENABLE = strArray2[10];
     PluginView.BTN_REMOVE = strArray2[11];
     PluginView.MNU_PLUGINABOUT = strArray2[12];
     RES_REMOVEPLGIN = strArray2[13];
     chbPreviewInfo.Text = strArray2[14];
     chbForceSysListView.Text = strArray2[15];
     chbAlwaysShowHeader.Text = strArray2[16];
     string[] strArray3 = QTUtility.TextResourcesDic["TabBar_Option_Buttons"];
     btnHistoryClear.Text = btnClearRecentFile.Text = strArray3[0];
     btnUp_Grp.Text = strArray3[1];
     btnUp_app.Text = strArray3[1];
     btnDown_Grp.Text = strArray3[2];
     btnDown_app.Text = strArray3[2];
     btnAddSep_Grp.Text = strArray3[3];
     btnAddSep_app.Text = strArray3[3];
     btnStartUpGrp.Text = strArray3[4];
     btnAlternateColor.Text = strArray3[6];
     btnAlternateColor_Text.Text = strArray3[7];
     btnAlternate_Default.Text = strArray3[8];
     btnDefaultTextExt.Text = strArray3[8];
     btnDefaultImgExt.Text = strArray3[8];
     btnPreviewFontDefault.Text = strArray3[8];
     btnAddTextExt.Text = strArray3[9];
     btnAddImgExt.Text = strArray3[9];
     btnDelTextExt.Text = strArray3[10];
     btnDelImgExt.Text = strArray3[10];
     btnCheckUpdates.Text = strArray3[11];
     btnCopyKeys.Text = strArray3[12];
     cmbNavBtn.Items.AddRange(new string[] { ResOpt_DropDown[0], ResOpt_DropDown[1] });
     cmbNewTabLoc.Items.AddRange(new string[] { ResOpt_DropDown[2], ResOpt_DropDown[3], ResOpt_DropDown[1], ResOpt_DropDown[0] });
     cmbActvClose.Items.AddRange(new string[] { ResOpt_DropDown[1], ResOpt_DropDown[0], ResOpt_DropDown[2], ResOpt_DropDown[3], ResOpt_DropDown[4] });
     cmbTabDblClck.Items.AddRange(new string[] { ResOpt_DropDown[5], ResOpt_DropDown[6], ResOpt_DropDown[7], ResOpt_DropDown[8], ResOpt_DropDown[9], ResOpt_DropDown[10], ResOpt_DropDown[11], ResOpt_DropDown[12], ResOpt_DropDown[13] });
     cmbBGDblClick.Items.AddRange(new string[] { ResOpt_DropDown[14], ResOpt_DropDown[5], ResOpt_DropDown[15], ResOpt_DropDown[0x10], ResOpt_DropDown[8], ResOpt_DropDown[0x11], ResOpt_DropDown[0x12], ResOpt_DropDown[0x13], ResOpt_DropDown[20], ResOpt_DropDown[0x16], ResOpt_DropDown[9], ResOpt_DropDown[4], ResOpt_DropDown[13] });
     cmbTabWhlClck.Items.AddRange(new string[] { ResOpt_DropDown[6], ResOpt_DropDown[5], ResOpt_DropDown[7], ResOpt_DropDown[8], ResOpt_DropDown[9], ResOpt_DropDown[10], ResOpt_DropDown[11], ResOpt_DropDown[12], ResOpt_DropDown[13] });
     cmbMultiRow.Items.AddRange(new string[] { ResOpt_DropDown[13], ResOpt_DropDown[0x15] + "1", ResOpt_DropDown[0x15] + "2" });
     cmbWhlClick.Items.AddRange(new string[] { ResOpt_DropDown[0x16], ResOpt_DropDown[9] });
     cmbTabSizeMode.Items.AddRange(new string[] { ResOpt_DropDown[0x17], ResOpt_DropDown[0x18], ResOpt_DropDown[0x19] });
     cmbTabTextAlignment.Items.AddRange(new string[] { ResOpt_DropDown[0x1d], ResOpt_DropDown[30] });
     cmbTextExts.Items.Add("(Text file)");
     cmbTextExts.Items.AddRange(QTUtility.PreviewExtsList_Txt.ToArray());
     cmbTextExts.SelectedIndex = 0;
     cmbImgExts.Items.Add("(Image & movie file)");
     cmbImgExts.Items.AddRange(QTUtility.PreviewExtsList_Img.ToArray());
     cmbImgExts.SelectedIndex = 0;
     cmbRebarBGImageMode.Items.AddRange(new string[] { ResOpt_DropDown[0x1a], ResOpt_DropDown[0x1b], ResOpt_DropDown[0x1c], ResOpt_DropDown[0x21] });
     cmbMenuRenderer.Items.AddRange(new string[] { ResOpt[0x2a], ResOpt_DropDown[0x1f], ResOpt_DropDown[0x20] });
     if(arrSpecialFolderCSIDLs == null) {
         if(!QTUtility.IsXP) {
             arrSpecialFolderCSIDLs = new int[] { 
     0x11, 0, 10, 3, 0x12, 0x31, 4, 5, 0x27, 13, 14, 6, 0x1a, 40, 0x20, 0x21, 
     8, 0x22
    };
         }
         else {
             arrSpecialFolderCSIDLs = new int[] { 0x11, 0, 10, 3, 0x12, 0x31, 4, 5, 0x27, 6, 0x1a, 40, 0x20, 0x21, 8, 0x22 };
         }
         arrSpecialFolderDipNms = new string[arrSpecialFolderCSIDLs.Length];
         for(int i = 0; i < arrSpecialFolderCSIDLs.Length; i++) {
             arrSpecialFolderDipNms[i] = ShellMethods.GetSpecialFolderCLSID(arrSpecialFolderCSIDLs[i], true);
         }
     }
     cmbSpclFol_NoCapture.Items.AddRange(arrSpecialFolderDipNms);
     cmbSpclFol_NoCapture.SelectedIndex = 0;
     cmbSpclFol_Grp.Items.AddRange(arrSpecialFolderDipNms);
     cmbSpclFol_Grp.SelectedIndex = 0;
     using(RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Quizo\QTTabBar")) {
         if(key != null) {
             int[] numArray = QTUtility2.ReadRegBinary<int>("OptionWindowBounds", key);
             if((numArray != null) && (numArray.Length == 4)) {
                 StartPosition = FormStartPosition.Manual;
                 SetDesktopBounds(numArray[0], numArray[1], numArray[2], numArray[3]);
             }
         }
     }
     SetValues();
     tabControl1.SelectedIndex = QTUtility.OptionsDialogTabIndex;
     ResumeLayout();
 }
Ejemplo n.º 6
0
 public void OwnerWindowClosing() {
     this.callBack = null;
     base.Close();
 }