Exemplo n.º 1
0
        private static void FileThumbItem(ThumbItem thumbItem, XXX item)
        {
            if (item == null)
            {
                return;
            }

            thumbItem.Added       = item.AddedDate;
            thumbItem.Cover       = item.Cover;
            thumbItem.Deleted     = item.IsDeleted;
            thumbItem.Description = item.Description;
            if (item.Cover != null)
            {
                thumbItem.HasCover = true;
            }
            else
            {
                thumbItem.Cover    = Util.CreateCover(item.Title);
                thumbItem.HasCover = false;
            }
            thumbItem.IsComplete  = item.IsComplete;
            thumbItem.Media       = item.Media.Name;
            thumbItem.Name        = item.Title;
            thumbItem.MyRating    = item.MyRating / 4;
            thumbItem.ReleaseDate = item.ReleaseDate;
            thumbItem.Runtime     = item.Runtime;
            thumbItem.Seen        = item.Watched;
            thumbItem.ToBeDeleted = item.ToBeDeleted;
            thumbItem.ToBuy       = item.IsWhish;
            thumbItem.ToWatch     = item.ToWatch;
        }
Exemplo n.º 2
0
        public static bool IsComplete(XXX objEntity)
        {
            if (objEntity.Ressources.Count == 0)
            {
                return(false);
            }
            if (objEntity.Description == null)
            {
                return(false);
            }
            if (objEntity.FileName == null)
            {
                return(false);
            }
            if (objEntity.FilePath == null)
            {
                return(false);
            }
            if (objEntity.Media == null)
            {
                return(false);
            }
            if (objEntity.Links.Count == 0)
            {
                return(false);
            }
            if (objEntity.Genres.Count == 0)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 3
0
        public static void Clean(XXX objItem)
        {
            objItem.Artists = null;

            foreach (Genre genre in objItem.Genres)
            {
                genre.IsOld = true;
            }

            foreach (Links link in objItem.Links)
            {
                link.IsOld = true;
            }

            foreach (Ressource ressource in objItem.Ressources)
            {
                ressource.IsOld = true;
            }

            objItem.RemoveCover = true;
            objItem.Cover       = null;

            objItem.BarCode      = string.Empty;
            objItem.Comments     = string.Empty;
            objItem.Description  = string.Empty;
            objItem.Language     = null;
            objItem.MyRating     = null;
            objItem.ReleaseDate  = null;
            objItem.Runtime      = null;
            objItem.IsComplete   = false;
            objItem.Artists      = null;
            objItem.PublicRating = null;
            objItem.Publisher    = null;
        }
Exemplo n.º 4
0
    public static void Main()
    {
        // After creating an array, instantiation got broken.
        XXX [] arr = new XXX [0];
        // this array creation is OK
        // BaseList<object> [] arr = new BaseList<object> [0];

        new BaseList <object> ();        // even this causes SISSEGV
    }
Exemplo n.º 5
0
 private void LoadItem()
 {
     _objItem = new XxxServices().Get(Id) as XXX;
     if (_objItem != null)
     {
         DataContext = _objItem;
         Bind();
     }
 }
Exemplo n.º 6
0
        public static void SetToBeDeleted(IList lstSelectedItems)
        {
            foreach (ThumbItem item in lstSelectedItems)
            {
                switch (item.EType)
                {
                case EntityType.Apps:
                    Apps objApps = Dal.GetInstance.GetApps(item.Id);
                    objApps.ToBeDeleted = true;
                    Dal.GetInstance.AddApps(objApps);
                    break;

                case EntityType.Books:
                    Books objBooks = Dal.GetInstance.GetBooks(item.Id);
                    objBooks.ToBeDeleted = true;
                    Dal.GetInstance.AddBook(objBooks);
                    break;

                case EntityType.Games:
                    Gamez objGamez = Dal.GetInstance.GetGames(item.Id);
                    objGamez.ToBeDeleted = true;
                    Dal.GetInstance.AddGame(objGamez);
                    break;

                case EntityType.Movie:
                    Movie objMovie = Dal.GetInstance.GetMovies(item.Id);
                    objMovie.ToBeDeleted = true;
                    Dal.GetInstance.AddMovie(objMovie);
                    break;

                case EntityType.Music:
                    Music objMusic = Dal.GetInstance.GetMusics(item.Id);
                    objMusic.ToBeDeleted = true;
                    Dal.GetInstance.AddMusic(objMusic);
                    break;

                case EntityType.Nds:
                    Nds objNds = Dal.GetInstance.GetNdss(item.Id);
                    objNds.ToBeDeleted = true;
                    Dal.GetInstance.AddNds(objNds);
                    break;

                case EntityType.Series:
                    SeriesSeason objSeriesSeason = Dal.GetInstance.GetSeries_Seasons(item.Id);
                    objSeriesSeason.ToBeDeleted = true;
                    Dal.GetInstance.AddSeriesSeason(objSeriesSeason);
                    break;

                case EntityType.XXX:
                    XXX objXxx = Dal.GetInstance.GetXxXs(item.Id);
                    objXxx.ToBeDeleted = true;
                    Dal.GetInstance.AddXxx(objXxx);
                    break;
                }
            }
        }
Exemplo n.º 7
0
        public static void SetClean(IList lstSelectedItem)
        {
            foreach (ThumbItem item in lstSelectedItem)
            {
                switch (item.EType)
                {
                case EntityType.Apps:
                    Apps objApps = Dal.GetInstance.GetApps(item.Id);
                    AppServices.Clean(objApps);
                    Update(objApps);
                    break;

                case EntityType.Books:
                    Books objBooks = Dal.GetInstance.GetBooks(item.Id);
                    BookServices.Clean(objBooks);
                    Update(objBooks);
                    break;

                case EntityType.Games:
                    Gamez objGamez = Dal.GetInstance.GetGames(item.Id);
                    GameServices.Clean(objGamez);
                    Update(objGamez);
                    break;

                case EntityType.Movie:
                    Movie objMovie = Dal.GetInstance.GetMovies(item.Id);
                    MovieServices.Clean(objMovie);
                    Update(objMovie);
                    break;

                case EntityType.Music:
                    Music objMusic = Dal.GetInstance.GetMusics(item.Id);
                    MusicServices.Clean(objMusic);
                    Update(objMusic);
                    break;

                case EntityType.Nds:
                    Nds objNds = Dal.GetInstance.GetNdss(item.Id);
                    NdsServices.Clean(objNds);
                    Update(objNds);
                    break;

                case EntityType.Series:
                    SeriesSeason objSeriesSeason = Dal.GetInstance.GetSeries_Seasons(item.Id);
                    SerieServices.Clean(objSeriesSeason);
                    Update(objSeriesSeason);
                    break;

                case EntityType.XXX:
                    XXX objXxx = Dal.GetInstance.GetXxXs(item.Id);
                    XxxServices.Clean(objXxx);
                    Update(objXxx);
                    break;
                }
            }
        }
    public static Task PostAsync(this XXX self, string requestUriString, string data)
    {
        var tcs = new TaskCompletionSource <bool>();

        self.Post(
            requestUriString,
            data,
            () => tcs.TrySetResult(true)
                () => tcs.TrySetException(new Exception()));
        return(tcs.Task);
    }
Exemplo n.º 9
0
 public TvixThemeManager(XXX objItem, string strThemePath)
 {
     InitializeComponent();
     chkGames.IsEnabled  = false;
     chkXXX.IsChecked    = true;
     chkMusic.IsEnabled  = false;
     chkSeries.IsEnabled = false;
     chkMovies.IsEnabled = false;
     _strThemePath       = strThemePath;
     _objItem            = objItem;
     cmdGenerate.Content = Application.Current.FindResource("cmdGenerateFile");
     CommonLoad();
 }
Exemplo n.º 10
0
 private void Awake()
 {
     foreach (Type type in typeof(Game).Assembly.GetTypes())
     {
         object[] attrs = type.GetCustomAttributes(typeof(TestAttribute), false);
         foreach (object attr in attrs)
         {
             HFLog.C(attr.GetType());
             XXX x = (XXX)Activator.CreateInstance(type);
             x.Test();
         }
     }
 }
Exemplo n.º 11
0
        public void TreeNodesFromDepths_0()
        {
            var items = new XXX[]
            {
            };
            var nodes =
                TreeBuilder.FromDepths(items, x => x.depth, i => new TreeNode <string>(i.val),
                                       (p, c) => p.AddChild(c)).ToList();

            var s = GetTreeStringBracket(nodes);

            Assert.AreEqual(0, nodes.Count);
            Assert.AreEqual("", s);
        }
Exemplo n.º 12
0
        public void IsXXXNotEqualToTest05()
        {
            XXX a = Two;

            try
            {
                Condition.Requires(a, "a").IsNotEqualTo(Two, "abc {0} xyz");
                Assert.Fail();
            }
            catch (ArgumentException ex)
            {
                Assert.IsTrue(ex.Message.Contains("abc a xyz"));
            }
        }
Exemplo n.º 13
0
        public void IsXXXNotInRangeTest07()
        {
            XXX a = Four;

            try
            {
                Condition.Requires(a, "a").IsNotInRange(Two, Four, "abc {0} xyz");
                Assert.Fail();
            }
            catch (ArgumentException ex)
            {
                Assert.IsTrue(ex.Message.Contains("abc a xyz"));
            }
        }
Exemplo n.º 14
0
        public void IsXXXLessThanTest05()
        {
            XXX a = Three;

            try
            {
                Condition.Requires(a, "a").IsLessThan(Two, "abc {0} xyz");
                Assert.Fail();
            }
            catch (ArgumentException ex)
            {
                Assert.IsTrue(ex.Message.Contains("abc a xyz"));
            }
        }
Exemplo n.º 15
0
        private void Runthread_TheadWorkResultEvent1(object sender, RunThread.TheadWorkResultEventArgs e)
        {
            if (serialPort1.IsOpen)
            {
                serialPort1.Write(buffer, 0, 3);
            }
            HOperatorSet.WriteImage(PublicData.CheckModel.ModelImage, "bmp", 0, Application.StartupPath + "\\ErrorImage\\" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm"));
            MessageBox.Show("出现错误:" + e.sResult + "\n" + "操作提示:" + "\n" + "1.请先停止检测再处理有问题的标签;" + "\n" + "2.摆正标签,开始检测");
            XXX stop = delegate
            {
                StartCheckButon.Text    = "开 始 检 测";
                StartCheckButon.Enabled = true;
            };

            StartCheckButon.Invoke(stop);
        }
    private void DoFireAndForgetAsync(XXX model)
    {
        try
        {
            using (var ctx = new FormsEntities())
            {
                var dbXXX = new DALXXX();
                dbXXX.Foo = model.Foo;

                ctx.DALXXX.Add(dbXXX);
                ctx.SaveChanges();
            }
        }catch (Exception ex)
        {
            // Remember that the Async code needs to handle its own
            // exceptions, as the "DoFireAndForget" method will never fail
            Log.Log.LogError(ex.GetMostInnerException(), "whatever");
        }
    }
Exemplo n.º 17
0
        void Start()
        {
            GameObject[] _gos = GameObject.FindGameObjectsWithTag("Player");

            arrGos = new GameObject[_gos.Length];
            for (int i = 0; i < _gos.Length; i++)
            {
                //array -> 데이타 카피해주기 (직접연결하면 레퍼런스로 가서 공유된다.).
                arrGos [i] = _gos [i];

                //array -> list
                listGos.Add(_gos [i]);

                //array -> dictionary
                XXX _x = new XXX(i, _gos[i]);
                dicGos.Add(_gos[i], _x);
            }

            //array -> list 직접생성...
            listGos2 = new List <GameObject> (_gos);
        }
Exemplo n.º 18
0
    public static void Main()
    {
        XXX xxx = new XXX(999);

        check_count(1);
        XXX x1 = null;
        XXX x2 = null;
        XXX x3 = null;
        XXX x4 = null;

        li_alaqiltype_inout.ptr_ref_out(out x1, out x2, out x3, out x4);
        check_value(111, x1.value);
        check_value(222, x2.value);
        check_value(333, x3.value);
        check_value(444, x4.value);
        check_count(5);
        x1.Dispose();
        x2.Dispose();
        x3.Dispose();
        x4.Dispose();
        xxx.Dispose();
        check_count(0);

        x1 = null;
        x2 = null;
        x3 = null;
        x4 = null;
        new ConstructorTest(out x1, out x2, out x3, out x4);
        check_count(4);
        check_value(111, x1.value);
        check_value(222, x2.value);
        check_value(333, x3.value);
        check_value(444, x4.value);
        x1.Dispose();
        x2.Dispose();
        x3.Dispose();
        x4.Dispose();
        check_count(0);
    }
Exemplo n.º 19
0
    // Use this for initialization
    void Start(Main x, XXX y)
    {
        XXX m = y;

        m.mPCube = bbb;

        aaa = 10;

        GameObject.DontDestroyOnLoad(this.gameObject);

        PlayerPrefs.SetFloat("xxx", 10);

        Resources.Load("images/bk");

        xy = new Vector2(1, 1);
        xy.x;
        xy.y;

        string path = Application.absoluteURL + "//";
        //Application.dataPath;
        WWW www = new WWW(path);

        www.texture;

        GameObject obj = GameObject.Instantiate(mPCube);

        this.gameObject.GetComponent <Camera> ();

        this.transform.Find("Cube");

        new Vector3Int();

        transform.position = new Vector3(1, 1, 1);
        float s = 0.5f;

        transform.localScale = new Vector3(s, 1, s);
    }
  public static void Main() {
    XXX xxx = new XXX(999);
    check_count(1);
    XXX x1 = null;
    XXX x2 = null;
    XXX x3 = null;
    XXX x4 = null;
    li_swigtype_inout.ptr_ref_out(out x1, out x2, out x3, out x4);
    check_value(111, x1.value);
    check_value(222, x2.value);
    check_value(333, x3.value);
    check_value(444, x4.value);
    check_count(5);
    x1.Dispose();
    x2.Dispose();
    x3.Dispose();
    x4.Dispose();
    xxx.Dispose();
    check_count(0);

    x1 = null;
    x2 = null;
    x3 = null;
    x4 = null;
    new ConstructorTest(out x1, out x2, out x3, out x4);
    check_count(4);
    check_value(111, x1.value);
    check_value(222, x2.value);
    check_value(333, x3.value);
    check_value(444, x4.value);
    x1.Dispose();
    x2.Dispose();
    x3.Dispose();
    x4.Dispose();
    check_count(0);
  }
Exemplo n.º 21
0
        public void IsXXXInRangeTest06()
        {
            XXX a = Four;

            Condition.Requires(a).IsInRange(Two, Four, string.Empty);
        }
Exemplo n.º 22
0
        public void IsXXXNotEqualToTest06()
        {
            XXX a = Two;

            Condition.Requires(a).SuppressExceptionsForTest().IsNotEqualTo(Two);
        }
Exemplo n.º 23
0
        public void IsXXXNotEqualToTest04()
        {
            XXX a = Three;

            Condition.Requires(a).IsNotEqualTo(Two, string.Empty);
        }
Exemplo n.º 24
0
        public void IsXXXInRangeTest05()
        {
            XXX a = Five;

            Condition.Requires(a).IsInRange(Two, Four);
        }
Exemplo n.º 25
0
        public void IsXXXNotEqualToTest03()
        {
            XXX a = Three;

            Condition.Requires(a).IsNotEqualTo(Two);
        }
Exemplo n.º 26
0
        public void IsXXXEqualToTest04()
        {
            XXX a = Two;

            Condition.Requires(a).IsEqualTo(Two, string.Empty);
        }
Exemplo n.º 27
0
        public void IsXXXEqualToTest02()
        {
            XXX a = Two;

            Condition.Requires(a).IsEqualTo(Two);
        }
Exemplo n.º 28
0
        public void IsXXXNotLessOrEqualTest06()
        {
            XXX a = One;

            Condition.Requires(a).SuppressExceptionsForTest().IsNotLessOrEqual(Two);
        }
Exemplo n.º 29
0
        public void IsXXXNotLessOrEqualTest03()
        {
            XXX a = Three;

            Condition.Requires(a).IsNotLessOrEqual(Two);
        }
Exemplo n.º 30
0
        public void IsXXXLessOrEqualTest04()
        {
            XXX a = Two;

            Condition.Requires(a).IsLessOrEqual(Two, string.Empty);
        }
Exemplo n.º 31
0
        public void IsXXXLessOrEqualTest02()
        {
            XXX a = Two;

            Condition.Requires(a).IsLessOrEqual(Two);
        }