private void pclstMouseDrag_SelectedIndexChanged(object sender, EventArgs e) { // リストボックス ListBox pclst = (ListBox)sender; if (0 <= pclst.SelectedIndex) { string sSelectedValue = (string)pclst.Items[pclst.SelectedIndex]; if ("画像移動" == sSelectedValue) { this.enumMousedragmode = EnumMousedragmode.Image_Move; } else { this.enumMousedragmode = EnumMousedragmode.None; } } else { // 未選択 this.enumMousedragmode = EnumMousedragmode.None; } }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> public Usercontrol_Canvas() { InitializeComponent(); //部品番号 { this.Partnumberconfig = new PartnumberconfigImpl(); this.Partnumberconfig.FirstIndex = 0; this.Partnumberconfig.SetBrushByColor( Color.FromArgb(192, 0, 255, 0));//75%透明の緑。 } //添付情報 { this.infodisplay = new Usercontrolview_Infodisplay(); } MemorySpriteImpl moSprite = new MemorySpriteImpl(); moSprite.List_Usercontrolview.Add(this.infodisplay); moSprite.List_Usercontrolview.Add(this.ucFrameParam); moSprite.List_Usercontrolview.Add(this); this.ucFrameParam.MemorySprite = moSprite; this.infodisplay.MemorySprite = moSprite; this.enumMousedragmode = EnumMousedragmode.None; this.pclstMouseDrag.Items.Add("なし"); this.pclstMouseDrag.Items.Add("画像移動"); this.pclstMouseDrag.SelectedIndex = 0; this.pcddlAlScale.Items.Add("x0.25"); this.pcddlAlScale.Items.Add("x0.5"); this.pcddlAlScale.Items.Add("x 1");//初期選択 this.pcddlAlScale.Items.Add("x 2"); this.pcddlAlScale.Items.Add("x 4"); this.pcddlAlScale.Items.Add("x 8"); this.pcddlAlScale.Items.Add("x 16"); this.pcddlAlScale.SelectedIndex = 2; this.pcddlBgclr.Items.Add("自動");//初期選択 this.pcddlBgclr.Items.Add("白"); this.pcddlBgclr.Items.Add("灰色"); this.pcddlBgclr.Items.Add("黒"); this.pcddlBgclr.Items.Add("赤"); this.pcddlBgclr.Items.Add("黄"); this.pcddlBgclr.Items.Add("緑"); this.pcddlBgclr.Items.Add("青"); this.pcddlBgclr.SelectedIndex = 0; this.pcddlOpaque.Items.Add("100");//初期選択 this.pcddlOpaque.Items.Add(" 75"); this.pcddlOpaque.Items.Add(" 50"); this.pcddlOpaque.Items.Add(" 25"); this.pcddlOpaque.SelectedIndex = 0; this.imgOpaque = 1.0F; this.pcchkGridVisibled.Checked = true; // 格子枠の色 this.pcddlGridColor.Items.Add("自動"); this.pcddlGridColor.Items.Add("白"); this.pcddlGridColor.Items.Add("灰色"); this.pcddlGridColor.Items.Add("黒"); this.pcddlGridColor.Items.Add("赤"); this.pcddlGridColor.Items.Add("黄"); this.pcddlGridColor.Items.Add("緑");//初期選択 this.pcddlGridColor.Items.Add("青"); this.pcddlGridColor.SelectedIndex = 6; this.scale = 1; this.preScale = 1; //部品番号の色 this.pcddlPartnumberColor.Items.Add("自動"); this.pcddlPartnumberColor.Items.Add("白"); this.pcddlPartnumberColor.Items.Add("灰色"); this.pcddlPartnumberColor.Items.Add("黒"); this.pcddlPartnumberColor.Items.Add("赤"); this.pcddlPartnumberColor.Items.Add("黄"); this.pcddlPartnumberColor.Items.Add("緑");//初期選択 this.pcddlPartnumberColor.Items.Add("青"); this.pcddlPartnumberColor.SelectedIndex = 6; //部品番号の半透明度 this.pcddlPartnumberOpaque.Items.Add("100"); this.pcddlPartnumberOpaque.Items.Add(" 75");//初期選択 this.pcddlPartnumberOpaque.Items.Add(" 50"); this.pcddlPartnumberOpaque.Items.Add(" 25"); this.pcddlPartnumberOpaque.SelectedIndex = 1; //部品番号の開始インデックス this.pctxtPartnumberFirst.Text = "0"; }
private void pclstMouseDrag_SelectedIndexChanged(object sender, EventArgs e) { // リストボックス ListBox pclst = (ListBox)sender; if (0 <= pclst.SelectedIndex) { string sSelectedValue = (string)pclst.Items[pclst.SelectedIndex]; if ("乗せる画像移動" == sSelectedValue) { this.mouseDragModeEnum = EnumMousedragmode.SPRITE_MOVE; } else if ("背景画像移動" == sSelectedValue) { this.mouseDragModeEnum = EnumMousedragmode.BG_MOVE; } else { this.mouseDragModeEnum = EnumMousedragmode.NONE; } } else { // 未選択 this.mouseDragModeEnum = EnumMousedragmode.NONE; } }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> public Usercontrol_XyMemo() { InitializeComponent(); this.mouseDragModeEnum = EnumMousedragmode.NONE; this.infoDisplay = new Spritememo_InfoDisplay(); this.pclstMouseDrag.Items.Add("なし"); this.pclstMouseDrag.Items.Add("背景画像移動"); this.pclstMouseDrag.Items.Add("乗せる画像移動"); this.pclstMouseDrag.SelectedIndex = 0; this.pcddlAlScale.Items.Add("x0.25"); this.pcddlAlScale.Items.Add("x0.5"); this.pcddlAlScale.Items.Add("x 1");//初期選択 this.pcddlAlScale.Items.Add("x 2"); this.pcddlAlScale.Items.Add("x 4"); this.pcddlAlScale.Items.Add("x 8"); this.pcddlAlScale.Items.Add("x 16"); this.pcddlAlScale.SelectedIndex = 2; this.pcddlBgOpaque.Items.Add("100"); this.pcddlBgOpaque.Items.Add(" 75"); this.pcddlBgOpaque.Items.Add(" 50");//初期選択 this.pcddlBgOpaque.Items.Add(" 25"); this.pcddlBgOpaque.SelectedIndex = 2; this.bgOpaque = 0.5F; // 格子枠の色 this.pcddlGridcolor.Items.Add("自動"); this.pcddlGridcolor.Items.Add("白"); this.pcddlGridcolor.Items.Add("灰色"); this.pcddlGridcolor.Items.Add("黒"); this.pcddlGridcolor.Items.Add("赤"); this.pcddlGridcolor.Items.Add("黄"); this.pcddlGridcolor.Items.Add("緑");//初期選択 this.pcddlGridcolor.Items.Add("青"); this.pcddlGridcolor.SelectedIndex = 6; this.bgLocation = new Point(); }
//──────────────────────────────────────── public Memory1Application_PartsnumputImpl() { this.controldialogOpenfileBg = new System.Windows.Forms.OpenFileDialog(); this.ScaleImg = 1; this.nameValueDic = new Dictionary<string, int>(); this.BgLocationScaled = new Point(); this.MemoryOperationmode = new Memory2Operationmode_NormalImpl();//this this.mouseDragModeEnum = EnumMousedragmode.None; this.layerDic = new Dictionary<int, List<Memory4bSpritePartsnumber>>(); this.list_NameGroup = new List<string>(); this.dictionary_MemoryPartsnumbergroupImpl = new Dictionary<string, Memory4aPartsnumbersymbolspritesImpl>(); this.sGroupNameArray = new string[0]; this.sFpath_Csv = ""; this.sFpath_BgPng = ""; this.BgOpaque = 0.5F; this.PreScale = 1; this.Count_Creates = 1; }