示例#1
0
        private static void btnSetFundamentTID_Action(string id, Dialog dialog)
        {
            string clipboard = GUIUtility.systemCopyBuffer;
            var    mode      = thingIDRegex.IsMatch(clipboard) ? SetFundamentTIDDialog.Mode.PreviewNewFundament : SetFundamentTIDDialog.Mode.ThingIDNotInClipboard;
            var    par       = new SetFundamentTIDDialog.Params(mode, clipboard);

            CustomDialog.SwitchTo <SetFundamentTIDDialog>(par, dialog.hand(), dialog.tabName);
        }
示例#2
0
 private static void chkDynamic_Action(string id, Dialog dialog, bool value)
 {
     if (value)
     {
         var par = new SetFundamentTIDDialog.Params(SetFundamentTIDDialog.Mode.ConfirmCollision, Main.config.FundamentTID);
         CustomDialog.SwitchTo <SetFundamentTIDDialog>(par, dialog.hand(), dialog.tabName);
     }
     else
     {
         Main.config.Dynamic = false;
         Main.config.Save();
     }
 }