public tagControl(Photo_selection _photo_Selection) { InitializeComponent(); this.imgNameList = new List <string>(); this.photo_Selection = _photo_Selection; d_tagName.DataSource = new List <string>(DB.m_product.getProductList().Values); }
public Photo_form(Photo_selection _photo_Selection, string _imgName) { InitializeComponent(); pictureBox1.MouseDown += new MouseEventHandler(this.picMouseDown); pictureBox1.MouseMove += new MouseEventHandler(this.picMouseMove); pictureBox1.MouseUp += new MouseEventHandler(this.picMouseUp); this.photo_Selection = _photo_Selection; this.imgName = _imgName; var ppath = System.IO.Path.Combine(this.photo_Selection.Photographer_Select_dir, this.imgName); this.pictureBox1.BackgroundImage = new Bitmap(ppath); this.id.Text = "[" + this.photo_Selection.imageList1.Images.Keys.IndexOf(this.imgName).ToString().PadLeft(4, '0') + "]"; this.Text = _imgName; tagList.ColumnCount = photo_Selection.tagCount; for (int i = 0; photo_Selection.tagCount > i; i++) { CheckBoxExp c = new CheckBoxExp(); c.Text = "■"; c.Size = new Size(30, 15); c.ForeColor = photo_Selection.TAGS[i]; c.Click += new System.EventHandler(this.c_cleck); c.photo_Selection = photo_Selection; c.tagId = i; tagList.Controls.Add(c, i, 0); foreach (tagControl tagc in photo_Selection.tagsPanel.Controls) { if (tagc.tagId == i) { foreach (var key in tagc.imageList1.Images.Keys) { if (key == imgName) { c.Checked = true; } } } } } }
private void Form1_Load(object sender, EventArgs e) { int marginHeight = 35; int marginWidth = 10; if (this.WindowState == FormWindowState.Maximized) { marginHeight = 0; marginWidth = 10; } form = this; //フォームに画面追加 Header_Menu = new Header_Menu(); MenuPanel.Controls.Add(Header_Menu); Header_Menu.Visible = false; Header_Menu.Height = 100; Header_Menu.Width = this.Width - marginWidth; Header_Menu.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; /* * Main_menu = new Main_menu(); * MainPanel.Controls.Add(Main_menu); * Main_menu.pageName = "メインメニュー"; * Main_menu.Visible = false; * Main_menu.Height = this.Height - marginHeight; * Main_menu.Width = this.Width - marginWidth; * Main_menu.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Facility_reservation = new Facility_reservation(); * MainPanel.Controls.Add(Facility_reservation); * Facility_reservation.pageName = "施設予約登録"; * Facility_reservation.Visible = false; * Facility_reservation.Height = this.Height - marginHeight; * Facility_reservation.Width = this.Width - marginWidth; * Facility_reservation.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Reservation_timetable = new Reservation_timetable(); * MainPanel.Controls.Add(Reservation_timetable); * Reservation_timetable.pageName = "予約タイムテーブル"; * Reservation_timetable.Visible = false; * Reservation_timetable.Height = this.Height - marginHeight; * Reservation_timetable.Width = this.Width - marginWidth; * Reservation_timetable.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; */ Photo_selection = new Photo_selection(); MainPanel.Controls.Add(Photo_selection); Photo_selection.pageName = "写真選択"; Photo_selection.Visible = false; Photo_selection.Height = this.Height - marginHeight; Photo_selection.Width = this.Width - marginWidth; Photo_selection.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; Reception_search = new Reception_search(); MainPanel.Controls.Add(Reception_search); Reception_search.pageName = "受付検索"; Reception_search.Visible = false; Reception_search.Height = this.Height - marginHeight; Reception_search.Width = this.Width - marginWidth; Reception_search.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; /* * Reception_details = new Reception_details(); * MainPanel.Controls.Add(Reception_details); * Reception_details.pageName = "受付詳細"; * Reception_details.Visible = false; * Reception_details.Height = this.Height - marginHeight; * Reception_details.Width = this.Width - marginWidth; * Reception_details.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Scheduled_search = new Scheduled_search(); * MainPanel.Controls.Add(Scheduled_search); * Scheduled_search.pageName = "施設予約検索"; * Scheduled_search.Visible = false; * Scheduled_search.Height = this.Height - marginHeight; * Scheduled_search.Width = this.Width - marginWidth; * Scheduled_search.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Customer_search = new Customer_search(); * MainPanel.Controls.Add(Customer_search); * Customer_search.pageName = "顧客検索"; * Customer_search.Visible = false; * Customer_search.Height = this.Height - marginHeight; * Customer_search.Width = this.Width - marginWidth; * Customer_search.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Costume_reservation_search = new Costume_reservation_search(); * MainPanel.Controls.Add(Costume_reservation_search); * Costume_reservation_search.pageName = "衣装予約検索"; * Costume_reservation_search.Visible = false; * Costume_reservation_search.Height = this.Height - marginHeight; * Costume_reservation_search.Width = this.Width - marginWidth; * Costume_reservation_search.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Costume_search = new Costume_search(); * MainPanel.Controls.Add(Costume_search); * Costume_search.pageName = "衣装検索"; * Costume_search.Visible = false; * Costume_search.Height = this.Height - marginHeight; * Costume_search.Width = this.Width - marginWidth; * Costume_search.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Store_master = new Store_master(); * MainPanel.Controls.Add(Store_master); * Store_master.pageName = "店舗マスタ"; * Store_master.Visible = false; * Store_master.Height = this.Height - marginHeight; * Store_master.Width = this.Width - marginWidth; * Store_master.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Staff_master = new Staff_master(); * MainPanel.Controls.Add(Staff_master); * Staff_master.pageName = "スタッフマスタ"; * Staff_master.Visible = false; * Staff_master.Height = this.Height - marginHeight; * Staff_master.Width = this.Width - marginWidth; * Staff_master.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Costume_master = new Costume_master(); * MainPanel.Controls.Add(Costume_master); * Costume_master.pageName = "衣装マスタ"; * Costume_master.Visible = false; * Costume_master.Height = this.Height - marginHeight; * Costume_master.Width = this.Width - marginWidth; * Costume_master.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Facility_master = new Facility_master(); * MainPanel.Controls.Add(Facility_master); * Facility_master.pageName = "施設マスタ"; * Facility_master.Visible = false; * Facility_master.Height = this.Height - marginHeight; * Facility_master.Width = this.Width - marginWidth; * Facility_master.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Store_calender = new Store_calender(); * MainPanel.Controls.Add(Store_calender); * Store_calender.pageName = "店舗カレンダー登録"; * Store_calender.Visible = false; * Store_calender.Height = this.Height - marginHeight; * Store_calender.Width = this.Width - marginWidth; * Store_calender.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Staff_shift = new Staff_shift(); * MainPanel.Controls.Add(Staff_shift); * Staff_shift.pageName = "スタッフシフト登録"; * Staff_shift.Visible = false; * Staff_shift.Height = this.Height - marginHeight; * Staff_shift.Width = this.Width - marginWidth; * Staff_shift.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Reception = new Reception(); * MainPanel.Controls.Add(Reception); * Reception.pageName = "受付登録"; * Reception.Visible = false; * Reception.Height = this.Height - marginHeight; * Reception.Width = this.Width - marginWidth; * Reception.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Costume_reservation = new Costume_reservation(); * MainPanel.Controls.Add(Costume_reservation); * Costume_reservation.pageName = "衣装予約"; * Costume_reservation.Visible = false; * Costume_reservation.Height = this.Height - marginHeight; * Costume_reservation.Width = this.Width - marginWidth; * Costume_reservation.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Costume_timetable = new Costume_timetable(); * MainPanel.Controls.Add(Costume_timetable); * Costume_timetable.pageName = "衣装予約テーブル"; * Costume_timetable.Visible = false; * Costume_timetable.Height = this.Height - marginHeight; * Costume_timetable.Width = this.Width - marginWidth; * Costume_timetable.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; * * Customer_information = new Customer_information(); * MainPanel.Controls.Add(Customer_information); * Customer_information.pageName = "顧客情報登録"; * Customer_information.Visible = false; * Customer_information.Height = this.Height - marginHeight; * Customer_information.Width = this.Width - marginWidth; * Customer_information.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; Login = new Login(); * */ /* * Order_entry = new Order_entry(); * MainPanel.Controls.Add(Order_entry); * Order_entry.pageName = "発注入力"; * Order_entry.Visible = false; * Order_entry.Height = this.Height - marginHeight; * Order_entry.Width = this.Width - marginWidth; * Order_entry.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; Login = new Login(); */ /* rental = new rental(); * MainPanel.Controls.Add(rental); * rental.pageName = "一括貸出"; * rental.Visible = false; * rental.Height = this.Height - marginHeight; * rental.Width = this.Width - marginWidth; * rental.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; Login = new Login(); */ Login = new Login(); MainPanel.Controls.Add(Login); Login.pageName = "ログイン"; Login.Visible = false; Login.Height = this.Height - marginHeight; Login.Width = this.Width - marginWidth; Login.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left; //初期表示画面を表示 Header_Menu.Visible = false; Login.Visible = true; Login.pageParent = Login; dispPage = Login; this.Text = Login.pageName; }