コード例 #1
0
ファイル: Collab.cs プロジェクト: HJfod/gdtools
            public string MergeParts()
            {
                try {
                    if (MergeBase.Text == "Base not selected")
                    {
                        return("No base selected!");
                    }

                    if (MergeList.Items.Count == 0)
                    {
                        return("No parts to merge!");
                    }

                    List <string> parts = new List <string> {
                    };
                    foreach (Elem.Select.SelectItem x in MergeList.Items)
                    {
                        parts.Add(x.Text);
                    }
                    string err = GDTools.MergeUsingReference(MergeBase.Text.Substring("Base: ".Length), parts, MergeLink, AutoReassignGroups);
                    if (err.Length > 0)
                    {
                        return(err);
                    }

                    MessageBox.Show("Succesfully merged! :)");

                    Program.MainForm.FullReload();

                    return("");
                } catch (Exception e) { MessageBox.Show(e.ToString(), "Error"); return(e.ToString()); }
            }