Example #1
0
    public override bool Load()
    {
        Select targetData = target as Select;

        var    client = new DatabaseClient("", "");
        string error  = string.Empty;
        var    db     = client.GetDatabase(targetData.SheetName, ref error);
        var    table  = db.GetTable <SelectData>(targetData.WorksheetName) ?? db.CreateTable <SelectData>(targetData.WorksheetName);

        List <SelectData> myDataList = new List <SelectData>();

        var all = table.FindAll();

        foreach (var elem in all)
        {
            SelectData data = new SelectData();

            data = Cloner.DeepCopy <SelectData>(elem.Element);
            myDataList.Add(data);
        }

        targetData.dataArray = myDataList.ToArray();

        EditorUtility.SetDirty(targetData);
        AssetDatabase.SaveAssets();

        return(true);
    }
        public LineCrosshairCoordinates2()
        {
            InitializeComponent();

            try
            {
                Axis   = new DataSource("000051");
                yData  = new DataSource("000051");
                model  = yData.getMiaoShu();
                y1Data = new DataSource("000052");
                model1 = y1Data.getMiaoShu();
                y2Data = new DataSource("000053");
                model2 = y2Data.getMiaoShu();
                y3Data = new DataSource("000054");
                model3 = y3Data.getMiaoShu();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            if (SelectData.getCount() == 0)
            {
                this.CategoryChart.Series[1].Visibility = Visibility.Hidden;
                this.CategoryChart.Series[2].Visibility = Visibility.Hidden;
            }
            else
            {
            }
        }
Example #3
0
 public frmDinImage(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw      = drw;
     this.updater  = updater;
     this.selector = selector;
     #region Свойства положения и размера
     udLeft.ValueChanged -= udLeft_ValueChanged;
     decimal value = (decimal)(float)drw.Props["Left"];
     udLeft.Value         = (value > 0) ? value : 0;
     udLeft.ValueChanged += udLeft_ValueChanged;
     udTop.ValueChanged  -= udTop_ValueChanged;
     value                  = (decimal)(float)drw.Props["Top"];
     udTop.Value            = (value > 0) ? value : 0;
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     #region Свойства для картинки
     cbMozaika.Checked     = (bool)drw.Props["Mozaika"];     // замостить
     cbStretch.Checked     = (bool)drw.Props["Stretch"];     // растянуть или сжать
     cbTransparent.Checked = (bool)drw.Props["Transparent"]; // прозрачный
     #endregion
     Image image = (Image)selector("ImageFileName", (string)drw.Props["ImageName"]);
     lbFileName.Text = drw.Props["ImageName"].ToString().ToLower();
     if (image != null)
     {
         pbPreview.Image = image;
     }
 }
Example #4
0
        public void SelextXTest()
        {
            List <Flight> expected = new List <Flight>(85);

            expected.Add(new Flight(1, "КА-123", "Київ", TimeSpan.Parse("21:25:00"), 80));
            expected.Add(new Flight(7, "КА-199", "Київ", TimeSpan.Parse("00:55:00"), 6));

            var             target = new MainWindow();
            object          sender = target;
            RoutedEventArgs e      = null;

            target.InitializeComponent();
            target.InfoFlightForm_Loaded(sender, e);

            target.SelectXMenuItem_Click(sender, e);

            string     cityX     = "Київ";
            SelectData selXytest = new SelectData();

            selXytest.SelextX(cityX);

            List <Flight> actual = selXytest.selectedCityList;

            for (int i = 0; i < 2; i++)
            {
                Assert.AreEqual(expected[i].id, actual[i].id);
                Assert.AreEqual(expected[i].number, actual[i].number);
                Assert.AreEqual(expected[i].city, actual[i].city);
                Assert.AreEqual(expected[i].depature_time, actual[i].depature_time);
                Assert.AreEqual(expected[i].free_seats, actual[i].free_seats);
            }
        }
        public double getMax(List <DataValue> datapoint, string str)
        {
            double[] dataPredict = new double[datapoint.Count];
            double[] dataValue   = new double[datapoint.Count];
            for (int i = 0; i < datapoint.Count; i++)
            {
                dataPredict[i] = datapoint[i].PredictData;
                if (str == "000051")
                {
                    dataValue[i] = datapoint[i].Y;
                }
                else if (str == "000052")
                {
                    dataValue[i] = datapoint[i].Y;
                }
                else if (str == "000053")
                {
                    dataValue[i] = datapoint[i].Y;
                }
                else if (str == "000054")
                {
                    dataValue[i] = datapoint[i].Y;
                }
            }

            return(SelectData.getHigh(dataPredict) > SelectData.getHigh(dataValue)?SelectData.getHigh(dataPredict):SelectData.getHigh(dataValue));
        }
Example #6
0
    void Awake()
    {
        // フレームレート設定
        Application.targetFrameRate = frameRate;

        // タイムスケール設定
        Time.timeScale = timeScale;

        // サウンド初期化
        oulAudio.Initialize();

        // 共通データ初期化
        SelectData.Initialize();

        // ウィンドウサイズサイズ
        Screen.SetResolution(windowWidth, windowHeight, false, 60);

        // カメラコンポーネントを取得します
        //cam = Camera.main;
        UpdateAspect();

        // プレイヤーデータ読み込み
        PlayerDataManager.Load();

        // カードデータ読み込み
        CardDataBase.Start();

        // カードの淵のデータ取得
        CardFrames.Init();
    }
Example #7
0
        /// <summary>
        /// 递归遍历装配体方法
        /// </summary>
        /// <param name="swComp"></param>
        /// <param name="nLevel"></param>
        private void TraverseAssembly(Component2 swComp, int nLevel)
        {
            object[]   vChildComp;
            Component2 swChildComp;

            vChildComp = (object[])swComp.GetChildren();
            for (int i = 0; i < vChildComp.Length; i++)
            {
                swChildComp = (Component2)vChildComp[i];
                AssemblyDoc swTempModel = (AssemblyDoc)swChildComp;
                TraverseAssembly(swChildComp, nLevel + 1);
                //选中要替换掉的零件
                SelectData seldate = ((SelectionMgr)swModel.SelectionManager).CreateSelectData();
                swChildComp.Select4(false, seldate, false);
                //替换零部件
                swTempModel.ReplaceComponents("", "", true, true);//零件地址
            }
            //object[] compNum = null;
            //int idex=1;
            ////_swApp = (SldWorks)MD_SW_ConnectSW.ConnectSW.iSwApp;
            //compNum = swApp.GetDocumentDependencies2(parentPath, false, false, false);
            //if (compNum != null)
            //{
            //    while (idex <= compNum.GetUpperBound(0))
            //    {
            //        string path = compNum[idex].ToString();
            //        idex++;
            //    }
            //}
        }
Example #8
0
        public string AttributeDataType(bool isCollection, int rank, string type, bool isGeneric)
        {
            if (isCollection)
            {
                if (SelectData.ContainsKey(type))
                {
                    var unionType = string.Join('|', ExpandPossibleTypes(type));
                    return($"{string.Join("", Enumerable.Repeat("Array<", rank))}{unionType}{string.Join("", Enumerable.Repeat(">", rank))}");
                }
                else
                {
                    return($"{string.Join("", Enumerable.Repeat("Array<", rank))}{type}{string.Join("", Enumerable.Repeat(">", rank))}");
                }
            }

            // Item is used in functions.
            if (isGeneric)
            {
                return("T");
            }

            // https://github.com/ikeough/IFC-gen/issues/25
            if (type == "IfcSiUnitName")
            {
                return("IfcSIUnitName");
            }

            if (SelectData.ContainsKey(type))
            {
                return(string.Join('|', ExpandPossibleTypes(type)));
            }

            return(type);
        }
Example #9
0
 public CircleDataSource(String str)
 {
     foreach (DataValue dataValue in SelectData.getData(str))
     {
         DataPointSample dataPoint = new DataPointSample();
         if (dataValue.CanShuNumber.Equals("000001"))
         {
             dataPoint.ValueR = dataValue.Y * 10;
         }
         else if (dataValue.CanShuNumber.Equals("000002"))
         {
             dataPoint.ValueR = dataValue.Y;
         }
         else if (dataValue.CanShuNumber.Equals("000003"))
         {
             dataPoint.ValueR = dataValue.Y / 7;
         }
         dataPoint.GrainTemp     = dataValue.GrainTemp;
         dataPoint.nameStr       = dataValue.yLable;
         dataPoint.ValueY        = dataValue.Y;
         dataPoint.ValueX        = dataValue.index;
         dataPoint.ValueDateTime = dataValue.date;
         dataPoint.ValueOfWater  = dataValue.Water;
         this.Add(dataPoint);
     }
 }
Example #10
0
    IEnumerator WaitSelect(SelectData selectData)
    {
        //Debug.Log("Waiting");
        while (true)
        {
            if (Input.anyKeyDown)
            {
                for (int i = 0; i < selectData.items.Count; i++)
                {
                    if (Input.GetKey(GetKeyCode(selectData.items[i].Button)))//todo输入按键
                    {
                        lastStage       = curStage;
                        curStage        = -selectData.items[i].Next;
                        stage.onMaskEnd = Select;
                        stage.SelectMask();
                        //Debug.Log("endWait");
                        yield break;
                    }
                }
            }


            yield return(null);
        }
    }
        private void TreeViewJointtreeAfterSelect(object sender, TreeViewEventArgs e)
        {
            Font fontRegular = new Font(treeViewJointTree.Font, FontStyle.Regular);
            Font fontBold    = new Font(treeViewJointTree.Font, FontStyle.Bold);

            if (previouslySelectedNode != null && !previouslySelectedNode.IsBaseNode)
            {
                SaveJointDataFromPropertyBoxes(previouslySelectedNode.Link.Joint);
            }
            if (previouslySelectedNode != null)
            {
                previouslySelectedNode.NodeFont = fontRegular;
            }
            LinkNode node = (LinkNode)e.Node;

            ActiveSWModel.ClearSelection2(true);
            SelectionMgr manager = ActiveSWModel.SelectionManager;

            SelectData data = manager.CreateSelectData();

            data.Mark = -1;
            foreach (Component2 component in node.Link.SWComponents)
            {
                component.Select4(true, data, false);
            }
            node.NodeFont = fontBold;
            node.Text     = node.Text;
            FillJointPropertyBoxes(node.Link.Joint);
            previouslySelectedNode = node;
        }
        private void SetUpTestData(string schemaName, params Dictionary <string, object>[] items)
        {
            var selectData = new SelectData(UserConnection, schemaName);

            items.ForEach(values => selectData.AddRow(values));
            selectData.MockUp();
        }
Example #13
0
 public frmDinValve(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw      = drw;
     this.updater  = updater;
     this.selector = selector;
     #region Свойства положения и размера
     udLeft.ValueChanged   -= udLeft_ValueChanged;
     udLeft.Value           = (decimal)(float)drw.Props["Left"];
     udLeft.ValueChanged   += udLeft_ValueChanged;
     udTop.ValueChanged    -= udTop_ValueChanged;
     udTop.Value            = (decimal)(float)drw.Props["Top"];
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     tbPtName.Text = (string)drw.Props["PtName"];
     //updateSelector();
     kindComboFillList(cbSpinValve, LastSpinIndex);
     kindComboSelectInList(cbSpinValve, (int)drw.Props["SpinValve"]);
     #region Свойства цвета линии
     DrawPlugin.colorComboFillList(cbForeColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbForeColor, (Color)drw.Props["ForeColor0"]);
     #endregion
     #region Свойства цвета заполнения
     DrawPlugin.colorComboFillList(cbBackColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbBackColor, (Color)drw.Props["BackColor0"]);
     #endregion
 }
Example #14
0
        public void SelectXYTest()
        {
            FlightList expected = new FlightList();

            expected.Add(new Flight(5, "КМ-608", "Мюнхен", TimeSpan.Parse("15:30:00"), 2));
            expected.Add(new Flight(8, "КМ-602", "Мюнхен", TimeSpan.Parse("07:35:00"), 32));
            var             target = new MainWindow();
            object          sender = target;
            RoutedEventArgs e      = null;

            target.InitializeComponent();
            target.InfoFlightForm_Loaded(sender, e);
            target.SelectXYMenuItem_Click(sender, e);
            string        cityX  = "Мюнхен";
            TimeSpan      time   = TimeSpan.Parse("20:00:00");
            List <Flight> actual = SelectData.SelectXY(expected, cityX, time);

            if (expected.Flights_list.Count != actual.Count)
            {
                Assert.Fail();
            }
            for (int i = 0; i < actual.Count; i++)
            {
                Assert.AreEqual(expected.Flights_list.ElementAt(i), actual.ElementAt(i));
            }
        }
Example #15
0
 public frmDinDraw(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw      = drw;
     this.updater  = updater;
     this.selector = selector;
     #region Свойства положения и размера
     udLeft.ValueChanged   -= udLeft_ValueChanged;
     udLeft.Value           = (decimal)(float)drw.Props["Left"];
     udLeft.ValueChanged   += udLeft_ValueChanged;
     udTop.ValueChanged    -= udTop_ValueChanged;
     udTop.Value            = (decimal)(float)drw.Props["Top"];
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     #region Свойства фона
     DrawPlugin.colorComboFillList(cbBackColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbBackColor, (Color)drw.Props["BackColor"]);
     cbBackPattern.Items.AddRange(DrawUtils.GetAllPatternNames()); // получение всех имён доступных паттернов
     cbBackPattern.SelectedIndex = (int)drw.Props["PatternMode"];
     cbBackPatternColor.Enabled  = (cbBackPattern.SelectedIndex > 1);
     DrawPlugin.colorComboFillList(cbBackPatternColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbBackPatternColor, (Color)drw.Props["PatternColor"]);
     #endregion
     tbTransparent.Value = 255 - (int)drw.Props["BackAlpha"];
     lbTransparent.Text  = ((int)(tbTransparent.Value / 255.0 * 100.0)) + " %";
     DrawPlugin.colorComboFillList(cbStrokeColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbStrokeColor, (Color)drw.Props["StrokeColor"]);
 }
Example #16
0
        public void SelectXTest()
        {
            FlightList expected = new FlightList();

            expected.Add(new Flight(7, "КА-199", "Київ", TimeSpan.Parse("00:55:00"), 6));
            expected.Add(new Flight(12, "LL-000", "Київ", TimeSpan.Parse("07:22:00"), 3));
            var             target = new MainWindow();
            object          sender = target;
            RoutedEventArgs e      = null;

            target.InitializeComponent();
            target.InfoFlightForm_Loaded(sender, e);
            target.SelectXMenuItem_Click(sender, e);
            string        cityX  = "Київ";
            List <Flight> actual = SelectData.SelectX(expected, cityX);

            if (expected.Flights_list.Count != actual.Count)
            {
                Assert.Fail();
            }
            for (int i = 0; i < actual.Count; i++)
            {
                Assert.AreEqual(expected.Flights_list.ElementAt(i), actual.ElementAt(i));
            }
        }
Example #17
0
 public frmBackground(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw             = drw;
     this.updater         = updater;
     this.selector        = selector;
     cbExpanded.Click    -= rbExpanded_Click;
     cbExpanded.Checked   = (bool)drw.Props["Expanded"];
     cbExpanded.Click    += rbExpanded_Click;
     cbSaveAspect.Click  -= cbSaveAspect_Click;
     cbSaveAspect.Checked = (bool)drw.Props["SaveAspect"];
     cbSaveAspect.Click  += cbSaveAspect_Click;
     cbSaveAspect.Enabled = udLeft.Enabled = udTop.Enabled = udWidth.Enabled =
         udHeight.Enabled = cbExpanded.Checked;
     #region Свойства положения и размера
     udLeft.ValueChanged   -= udLeft_ValueChanged;
     udLeft.Value           = (decimal)(float)drw.Props["Left"];
     udLeft.ValueChanged   += udLeft_ValueChanged;
     udTop.ValueChanged    -= udTop_ValueChanged;
     udTop.Value            = (decimal)(float)drw.Props["Top"];
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     #region Свойства цвета фона
     DrawPlugin.colorComboFillList(cbBackColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbBackColor, (Color)drw.Props["BackColor"]);
     #endregion
     tbSchemeName.Text = (string)drw.Props["SchemeName"];
     tbDescriptor.Text = (string)drw.Props["Descriptor"];
 }
Example #18
0
        private void SetUpScalarTestData <T>(string schemaName, Action <SelectData> filterAction, T value)
        {
            var selectData = new SelectData(UserConnection, schemaName);

            filterAction.Invoke(selectData);
            selectData.MockScalar <T>(value);
        }
Example #19
0
    void CanSelect()
    {
        StageData stageData = storyData.GetStageDataByID(curStage);


        if (stageData.Select > 0)
        {
            canPause = false;
            //Debug.Log("can select" + curStage);
            SelectData selectData = storyData.GetSelectDataByID(stageData.Select);
            stage.SetSelect(selectData);
            //stage.ActAside(true);
            if (waitSelect != null)
            {
                StopCoroutine(waitSelect);
                waitSelect = null;
            }
            waitSelect = WaitSelect(selectData);
            StartCoroutine(waitSelect);
        }
        if (stageData.Select == 0)
        {
            canPause   = false;
            canShowMap = false;
            StartCoroutine(WaitPhone());
        }
    }
Example #20
0
        // GET: Students/Create
        public IActionResult Create()
        {
            SelectData selectData = new SelectData();

            ViewBag.Languages = new SelectList(selectData.languages);
            ViewBag.Levels    = new SelectList(selectData.levels);
            return(View());
        }
Example #21
0
        public SelectData ProcessReadTransaction(ReadTransaction readTransaction)
        {
            lock (_tableLocks[readTransaction.TableDefinition.DataAddress])
            {
                SelectData selectData = _reader.GetRows(readTransaction.TableDefinition, readTransaction.Selects, readTransaction.PredicateOperations);

                return(selectData);
            }
        }
Example #22
0
        public async Task <SelectData> CloseFunction(string strDataSelected)
        {
            var lReturn   = new SelectData();
            int idAldakin = await GetIdUserAldakinAsync();

            lReturn = await _IWriteDataBase.CloseWorkerWeekAsync(strDataSelected, idAldakin);

            return(lReturn);
        }
Example #23
0
        // GET: Groups/Create
        public IActionResult Create()
        {
            SelectData selectData = new SelectData();

            ViewBag.Languages   = new SelectList(selectData.languages);
            ViewBag.Levels      = new SelectList(selectData.levels);
            ViewData["TutorId"] = new SelectList(_context.Tutors, "Id", "FullName");

            return(View());
        }
        public double getMax(List <DataValue> datapoint)
        {
            double[] dataPredict = new double[datapoint.Count];
            for (int i = 0; i < datapoint.Count; i++)
            {
                dataPredict[i] = datapoint[i].PredictData;
            }

            return(SelectData.getHigh(dataPredict));
        }
Example #25
0
 public void SetSelect(SelectData data)
 {
     listSelections.Clear();
     txtAside.text = data.Title;
     for (int i = 0; i < data.items.Count; i++)
     {
         Transform tr = listbox.transform;
         tr.position += new Vector3(0f, i * 60f, 0f);
         listSelections.Add(GameObject.Instantiate(PrefebSelection, tr).GetComponent <SelectionText>());
     }
 }
Example #26
0
 public frmDinLine(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw      = drw;
     this.updater  = updater;
     this.selector = selector;
     #region Свойства положения и размера
     udLeft.ValueChanged   -= udLeft_ValueChanged;
     udLeft.Value           = (decimal)(float)drw.Props["Left"];
     udLeft.ValueChanged   += udLeft_ValueChanged;
     udTop.ValueChanged    -= udTop_ValueChanged;
     udTop.Value            = (decimal)(float)drw.Props["Top"];
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     tbPtName.Text = (string)drw.Props["PtName"];
     updateSelector();
     kindComboFillList(cbLineKind, LastKindIndex);
     kindComboSelectInList(cbLineKind, (int)drw.Props["LineKind"]);
     #region Свойства цвета линии
     DrawPlugin.colorComboFillList(cbColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbColor, (Color)drw.Props["Color"]);
     #endregion
     #region Свойства стиля линии
     styleComboFillList(cbLineStyle, LastStyleIndex);
     styleComboSelectInList(cbLineStyle, (int)drw.Props["LineStyle"]);
     #endregion
     udLineWidth.Value = (decimal)(float)drw.Props["LineWidth"];
     #region Свойства цвета линии 0
     DrawPlugin.colorComboFillList(cbColor0, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbColor0, (Color)drw.Props["Color0"]);
     #endregion
     #region Свойства стиля линии 0
     styleComboFillList(cbLineStyle0, LastStyleIndex);
     styleComboSelectInList(cbLineStyle0, (int)drw.Props["LineStyle0"]);
     #endregion
     udLineWidth0.Value = (decimal)(float)drw.Props["LineWidth0"];
     #region Свойства цвета линии 1
     DrawPlugin.colorComboFillList(cbColor1, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbColor1, (Color)drw.Props["Color1"]);
     #endregion
     #region Свойства стиля линии 1
     styleComboFillList(cbLineStyle1, LastStyleIndex);
     styleComboSelectInList(cbLineStyle1, (int)drw.Props["LineStyle1"]);
     #endregion
     udLineWidth1.Value = (decimal)(float)drw.Props["LineWidth1"];
 }
Example #27
0
 public static Dictionary <int, IList> GetDataSources()
 {
     d = new Dictionary <int, IList>();
     try
     {
         d.Add(0, SelectData.getData(SelectPageYuMiPoHuai.DongTaiModels));
     }
     catch (Exception e)
     {
         throw e;
     }
     return(d);
 }
Example #28
0
 public LineValueOverlays()
 {
     InitializeComponent();
     if (SelectData.getCount() == 0)
     {
         this.line.Visibility = Visibility.Hidden;
         //this.line1.Visibility = Visibility.Visible;
     }
     else
     {
         this.line.Visibility = Visibility.Visible;
         //this.line1.Visibility = Visibility.Hidden;
     }
 }
Example #29
0
        //Selects components from a list.
        public static void selectComponents(ModelDoc2 model, List <Component2> components, bool clearSelection = true, int mark = -1)
        {
            if (clearSelection)
            {
                model.ClearSelection2(true);
            }
            SelectionMgr manager = model.SelectionManager;
            SelectData   data    = manager.CreateSelectData();

            data.Mark = mark;
            foreach (Component2 component in components)
            {
                component.Select4(true, data, false);
            }
        }
Example #30
0
 public frmDinJump(Draw drw, UpdateDraw updater, SelectData selector)
 {
     InitializeComponent();
     this.drw      = drw;
     this.updater  = updater;
     this.selector = selector;
     #region Свойства положения и размера
     udLeft.ValueChanged   -= udLeft_ValueChanged;
     udLeft.Value           = (decimal)(float)drw.Props["Left"];
     udLeft.ValueChanged   += udLeft_ValueChanged;
     udTop.ValueChanged    -= udTop_ValueChanged;
     udTop.Value            = (decimal)(float)drw.Props["Top"];
     udTop.ValueChanged    += udTop_ValueChanged;
     udWidth.ValueChanged  -= udWidth_ValueChanged;
     udWidth.Value          = (decimal)(float)drw.Props["Width"];
     udWidth.ValueChanged  += udWidth_ValueChanged;
     udHeight.ValueChanged -= udHeight_ValueChanged;
     udHeight.Value         = (decimal)(float)drw.Props["Height"];
     udHeight.ValueChanged += udHeight_ValueChanged;
     #endregion
     cbFramed.Checked = (bool)drw.Props["Framed"];
     cbSolid.Checked  = (bool)drw.Props["Solid"];
     #region Свойства шрифта
     DrawPlugin.fontComboFillList(cbFontName);
     cbFontName.Text          = (string)drw.Props["FontName"];
     udFontSize.ValueChanged -= udFontSize_ValueChanged;
     udFontSize.Value         = (decimal)(float)drw.Props["FontSize"];
     udFontSize.ValueChanged += udFontSize_ValueChanged;
     cbBold.Checked           = (bool)drw.Props["FontBold"];
     cbItalic.Checked         = (bool)drw.Props["FontItalic"];
     cbUnderline.Checked      = (bool)drw.Props["FontUnderline"];
     cbStrikeout.Checked      = (bool)drw.Props["FontStrikeOut"];
     DrawPlugin.colorComboFillList(cbFontColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbFontColor, (Color)drw.Props["FontColor"]);
     #endregion
     #region Свойства цвета фона
     DrawPlugin.colorComboFillList(cbColor, LastColorIndex);
     DrawPlugin.colorComboSelectInList(cbColor, (Color)drw.Props["Color"]);
     cbColor.Enabled = cbSolid.Checked;
     #endregion
     tbScreenName.TextChanged -= tbScreenName_TextChanged;
     tbScreenName.Text         = (string)drw.Props["ScreenName"];
     tbScreenName.TextChanged += tbScreenName_TextChanged;
     cbKeyLevel.SelectedIndex  = (int)drw.Props["KeyLevel"];
     tbText.TextChanged       -= tbText_TextChanged;
     tbText.Text         = (string)drw.Props["Text"];
     tbText.TextChanged += tbText_TextChanged;
 }
 public bool Select(bool Append, SelectData Data)
 {
     return _Manipulator.Select(Append, Data);
 }
Example #32
0
 public InsertDimension(ISldWorks swApp, Entity entity, Ordinate vertex, SelectData swSelData)
 {
     _swModel = swApp.IActiveDoc2;
     _ent = entity;
     _vertex = vertex;
     _swSelData = swSelData;
 }
Example #33
0
 public DisplayDimension GetDisplayDim(DrawingDoc swDrawing, Entity ent, SelectData swSelData)
 {
     ent.Select4(true, swSelData);
     return (DisplayDimension)swDrawing.AddHoleCallout2(0, 0, 0);
 }
Example #34
0
 public FoundCoordinate(ISldWorks swApp, Entity ent, Ordinate vertex, double[] dimLineH, double[] dimLineV, BlockPosition side,View swView,bool doThroughHoles)
 {
     _swApp = swApp;
     _swModel = swApp.IActiveDoc2;
     _side = side;
     _ent = ent;
     _vertex = vertex;
     _doThroughHoles = doThroughHoles;
     _swSelData = _swModel.ISelectionManager.CreateSelectData();
     _swView = swView;
     _coordinate = FindCoord(dimLineH, dimLineV);
 }