示例#1
0
 void ItemLengthLabelUpdate()
 {
     multiMode           = MultipleMode.None;
     multiCopy           = false;
     pv.AdditionalString = null;
     if (menuMultiCopy.Checked)
     {
         menuMultiCopy.Checked = false;
     }
     waitingKey       = Keys.None;
     statusLabel.Text = "完了";
     if (Core.CurrentOperation == null)
     {
         itemLengthLabel.Text = "0 / 0";
     }
     else
     {
         itemLengthLabel.Text = (Core.CurrentOperation.Index + 1).ToString() + " / " + Core.CurrentOperation.Data.ElementsLength.ToString();
         if (Core.Config.BehaviorConfig.BackupInterval != 0 &&
             Core.CurrentOperation.Index % Core.Config.BehaviorConfig.BackupInterval == 0)
         {
             Subsystem.OperationPackager.DoBackup();
         }
     }
 }
示例#2
0
        public bool Acceptable(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
            case MultipleMode.Sequencable:
                return(Args.Count > 0);

            case MultipleMode.SingleOnly:
                return(Args.Count == 1);
            }
            return(false);
        }
示例#3
0
 private void menuSetFolder_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.FolderMulti)
     {
         multiMode             = MultipleMode.None;
         menuSetFolder.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         multiMode             = MultipleMode.FolderMulti;
         menuSetMulti.Checked  = false;
         menuSetFolder.Checked = true;
         UpdateAdditionalString();
     }
 }
示例#4
0
        public override void Call(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
                Method.Invoke(Args[0], new object[] { Args.ToArray() });
                break;

            case MultipleMode.Sequencable:
                for (int i = 0; i < Args.Count; i++)
                {
                    Method.Invoke(Args[i], null);
                }
                break;

            case MultipleMode.SingleOnly:
                Method.Invoke(Args[0], null);
                break;
            }
        }
示例#5
0
 private void menuSetMulti_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.NumericMulti)
     {
         multiMode            = MultipleMode.None;
         menuSetMulti.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         using (var mul = new Dialogs.MultiProcess(Core.CurrentOperation.Data.ElementsLength - Core.CurrentOperation.Index))
         {
             if (mul.ShowDialog() == DialogResult.OK)
             {
                 multiMode             = MultipleMode.NumericMulti;
                 setMultiValue         = mul.GetValue();
                 menuSetMulti.Checked  = true;
                 menuSetFolder.Checked = false;
                 UpdateAdditionalString();
             }
         }
     }
 }
示例#6
0
        public override void Call(MultipleMode mode)
        {
            switch (mode)
            {
            case MultipleMode.NativeMulti:
                MultiAction(Args.ToArray());
                break;

            case MultipleMode.Sequencable:
                foreach (var action in Actions)
                {
                    action();
                }
                break;

            case MultipleMode.SingleOnly:
                if (Actions[0] != null)
                {
                    Actions[0]();
                }
                break;
            }
        }
示例#7
0
 public abstract void Call(MultipleMode mode);
示例#8
0
文件: MainForm.cs 项目: karno/Typict
 private void menuSetMulti_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.NumericMulti)
     {
         multiMode = MultipleMode.None;
         menuSetMulti.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         using (var mul = new Dialogs.MultiProcess(Core.CurrentOperation.Data.ElementsLength - Core.CurrentOperation.Index))
         {
             if (mul.ShowDialog() == DialogResult.OK)
             {
                 multiMode = MultipleMode.NumericMulti;
                 setMultiValue = mul.GetValue();
                 menuSetMulti.Checked = true;
                 menuSetFolder.Checked = false;
                 UpdateAdditionalString();
             }
         }
     }
 }
示例#9
0
文件: MainForm.cs 项目: karno/Typict
 private void menuSetFolder_Click(object sender, EventArgs e)
 {
     if (multiMode == MultipleMode.FolderMulti)
     {
         multiMode = MultipleMode.None;
         menuSetFolder.Checked = false;
         UpdateAdditionalString();
     }
     else
     {
         multiMode = MultipleMode.FolderMulti;
         menuSetMulti.Checked = false;
         menuSetFolder.Checked = true;
         UpdateAdditionalString();
     }
 }
示例#10
0
文件: MainForm.cs 项目: karno/Typict
 void ItemLengthLabelUpdate()
 {
     multiMode = MultipleMode.None;
     multiCopy = false;
     pv.AdditionalString = null;
     if (menuMultiCopy.Checked)
         menuMultiCopy.Checked = false;
     waitingKey = Keys.None;
     statusLabel.Text = "完了";
     if (Core.CurrentOperation == null)
     {
         itemLengthLabel.Text = "0 / 0";
     }
     else
     {
         itemLengthLabel.Text = (Core.CurrentOperation.Index + 1).ToString() + " / " + Core.CurrentOperation.Data.ElementsLength.ToString();
         if (Core.Config.BehaviorConfig.BackupInterval != 0 &&
             Core.CurrentOperation.Index % Core.Config.BehaviorConfig.BackupInterval == 0)
             Subsystem.OperationPackager.DoBackup();
     }
 }