Exemplo n.º 1
0
        private void ShowIn3D_Click(object sender, RoutedEventArgs e)
        {
            File.Copy(Path.Combine("Common", "box.3DS"), Path.Combine(textures.First().Path, "box.3DS"), true);
            File.Copy(Path.Combine("Common", "sphere.3DS"), Path.Combine(textures.First().Path, "sphere.3DS"), true);
            File.Copy(Path.Combine("Common", "tube.3DS"), Path.Combine(textures.First().Path, "tube.3DS"), true);
            File.Copy(Path.Combine("Common", "teapot.3DS"), Path.Combine(textures.First().Path, "teapot.3DS"), true);

            Show3D ddd = new Show3D(textures.First().Path);

            ddd.Show();
        }
Exemplo n.º 2
0
    /// <summary>
    /// 添加或者删除已知键
    /// </summary>
    /// <param name="pKey"></param>
    /// <param name="pContent"></param>
    public void AddToCurrentData(int pKey, string pContent, ref bool pChecked)
    {
        switch (UserChoose)
        {
        case PlayState.Introduce:
            if (EnterpriseIntroduce.ContainsKey(pKey))
            {
                EnterpriseIntroduce.Remove(pKey);
                pChecked = false;
            }
            else
            {
                EnterpriseIntroduce.Add(pKey, pContent);
                pChecked = true;
            }
            break;

        case PlayState.Publicity:
            if (PublicityBooks.ContainsKey(pKey))
            {
                PublicityBooks.Remove(pKey);
                pChecked = false;
            }
            else
            {
                PublicityBooks.Add(pKey, pContent);
                pChecked = true;
            }
            break;

        case PlayState.Show3D:
            if (Show3D.ContainsKey(pKey))
            {
                Show3D.Remove(pKey);
                pChecked = false;
            }
            else
            {
                Show3D.Add(pKey, pContent);
                pChecked = true;
            }
            break;

        default:
            break;
        }
    }