Exemple #1
0
    public void SwitchFBD(Fbd diagrama)
    {
        if (FBDActual != null)
        {
            FBDActual.SetActive(false);
        }
        if (diagrama.Equals(Fbd.NormalTangencial))
        {
//			FBDActual = FBDNormalTangencial;
            // Cancelled.
        }
        else if (diagrama.Equals(Fbd.XY))
        {
            FBDActual = FBDXY;
        }
        else if (diagrama.Equals(Fbd.FuerzasReales))
        {
            FBDActual = FBDFuerzasReales;
        }
        else
        {
            Debug.LogError("Error, Nombre de FBD desconocido");
        }
        FBDActual.SetActive(true);
    }
Exemple #2
0
 private void imgIcon_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right && Program.api.AppIcon != null)//判断你点的是不是右键
     {
         if (Fbd.ShowDialog() == DialogResult.OK)
         {
             //记录选中的目录
             Program.api.SavePath = Fbd.SelectedPath;
             RunAsync(() => {
                 Program.api.SaveIcon(Program.api.IconPath);
             });
         }
     }
 }
Exemple #3
0
        private void ExportResBtn_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(ExportPath))
            {
                //设置此次默认目录为上一次选中目录
                Fbd.SelectedPath = ExportPath;
            }

            if (Fbd.ShowDialog() == DialogResult.OK)
            {
                //记录选中的目录
                ExportPath = Fbd.SelectedPath;
                RunAsync(() => {
                    ExportResXml(ExportPath);
                });
            }


            OnExportResSuccess = () => {
                RunInMainthread(() => {
                    MessageBox.Show("已导出!");
                });
            };
        }
Exemple #4
0
        private void SaveItemMenu_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Program.api.SavePath))
            {
                //设置此次默认目录为上一次选中目录
                Fbd.SelectedPath = Program.api.SavePath;
            }

            if (Fbd.ShowDialog() == DialogResult.OK)
            {
                //记录选中的目录
                Program.api.SavePath = Fbd.SelectedPath;
                RunAsync(() => {
                    Program.api.SaveSelect(selectedpath);
                });
            }


            Program.api.OnExtractSuccess = () => {
                RunInMainthread(() => {
                    MessageBox.Show("已导出!");
                });
            };
        }
Exemple #5
0
 public void switchFBD(Fbd f)
 {
     ((FBDView)currentView).SwitchFBD(f);
 }