コード例 #1
0
        public static void StartCaseOptimization(string name, double length, double width, double height)
        {
            FormDefineCaseOptimization form = new FormDefineCaseOptimization();
            form.BoxName = name;
            form.BoxLength = length;
            form.BoxWidth = width;
            form.BoxHeight = height;

            if (DialogResult.OK != form.ShowDialog())
                return;

            // create document
            Document doc = new Document(name, name + "_on_" + form.SelectedPallet.Name, "from extension component", DateTime.Now, null);
            // create case in document
            BoxProperties boxInDoc = doc.CreateNewBox(form.SelectedBox);
            // create pallet in document
            PalletProperties palletInDoc = doc.CreateNewPallet(form.SelectedPallet);
        }
コード例 #2
0
        public void StartCaseOptimization(string name, double length, double width, double height)
        {
            FormDefineCaseOptimization formCaseOptimization = new FormDefineCaseOptimization();
            formCaseOptimization.BoxName = name;
            formCaseOptimization.BoxLength = length;
            formCaseOptimization.BoxWidth = width;
            formCaseOptimization.BoxHeight = height;

            if (DialogResult.OK != formCaseOptimization.ShowDialog())
                return;

            // create document
            Document doc = new Document(name, name + "_on_" + formCaseOptimization.SelectedPallet.Name, "from extension component", DateTime.Now, null);
            // create case in document
            BoxProperties boxInDoc = doc.CreateNewBox(formCaseOptimization.SelectedBox);
            // create pallet in document
            PalletProperties palletInDoc = doc.CreateNewPallet(formCaseOptimization.SelectedPallet);

        }