SetLabelVisual() public method

public SetLabelVisual ( int index ) : void
index int
return void
Beispiel #1
0
        private void listViewSelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (listviewapt.SelectedIndex == -1)
                {
                    //did not select item
                    setTextboxText("");
                    itemIndex            = -1;
                    textboxgroupbox.Text = "";
                }
                else
                {
                    itemIndex = listviewapt.SelectedIndex;
                    setTextboxText(wsp.Store[fileName][itemIndex].Text);
                    textboxgroupbox.Text = (itemIndex + 1).ToString();

                    if (workMode == WorkMode.Input)
                    {
                        if (picview.Focused)
                        {
                            return;
                        }
                        if (listviewapt.SelectedIndexCount > 1)
                        {
                            return;
                        }
                        picview.SetLabelVisual(listviewapt.SelectedIndex);
                    }
                    else if (workMode == WorkMode.Check)
                    {
                        if (listviewapt.SelectedIndexCount > 1)
                        {
                            return;
                        }

                        if (listviewapt.ListView.Focused == true)
                        {
                            picview.SetLabelVisual(listviewapt.SelectedIndex);
                        }
                    }
                }
            }
            catch { }
        }